package ru.nsu.fit.iconveyor.engine;

/**
 * Observes changes of engine state.
 */
public interface EngineStateObserver {

    /**
     * Indicates that execution was started.
     */
    void onStart();

    /**
     * Indicates that execution was successfully finished.
     */
    void onFinish();

    /**
     * Called when some error happened.
     * @param cause exception which caused an error
     * @param stopped indicates if execution of conveyor vas stopped because of this error
     */
    void onError(Exception cause, boolean stopped);

    /**
     * Indicates that execution of conveyor was force stopped.
     */
    void onStop();

}
